import { BaseController, CoolController } from "@cool-midway/core";
import { ProviderCustomerService } from "../../service/customer";
import { ProviderCustomerEntity } from "../../entity/customer";
import { Body, Post } from "@midwayjs/core";

@CoolController({
    api: ['add', 'update', 'page', 'delete', 'info'],
    service: ProviderCustomerService,
    entity: ProviderCustomerEntity,
})
export class ProviderCustomerController extends BaseController {
    
    @Post('/status', { summary: '启用/禁用客户' })
    async status(@Body('id') id: number, @Body('status') status: number) {
        await this.service.status(id, status);
        return this.ok();
    }
}

